import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooGuestUsersController } from '../../../controllers';
const uctooguestUsersRouter = new Router();
const guestUsersController = new uctooGuestUsersController();

uctooguestUsersRouter.post('/add', requireUser, guestUsersController.add);
uctooguestUsersRouter.post('/edit', requireUser, rowLevelPermission('uctoo/guest_users'), guestUsersController.edit);
uctooguestUsersRouter.post('/del', requireUser, rowLevelPermission('uctoo/guest_users'), guestUsersController.delete);

//For getting guestUsers with permission control
uctooguestUsersRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/guest_users'), guestUsersController.getSingle);
uctooguestUsersRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/guest_users'), guestUsersController.getMany);
uctooguestUsersRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/guest_users'), guestUsersController.getMany);

//#endregion AutoCreateCode
export default uctooguestUsersRouter;
